package club.cearnach.api.dao;

import club.cearnach.entity.MovieType;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

/**
 * @author 阮胜
 * @date 2018/5/12 13:44
 */
public interface IMovieTypeDao extends JpaRepository<MovieType, Integer> {
    Optional<MovieType> findByTypeName(String name);

    Optional<MovieType> findByTypeNameAndIdNot(String typeName, Integer id);
}
